#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void rotate(int* nums, int numsSize, int k) {
    k = k % numsSize;
    int arr[50];
    for (int i = 0; i < numsSize; i++)
    {
        arr[(i + k) % numsSize] = nums[i];
    }

    for (int j = 0; j < numsSize; j++)
    {
        nums[j] = arr[j];
    }
}
int main()
{
    int nums[7] = { 1, 2, 3, 4, 5, 6, 7 };
    int k = 3;
    int numsize = sizeof(nums) / sizeof(nums[0]);
    rotate(nums, numsize, k);

    return 0;
}